/* 登录页面样式 */
.login-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 20, 40, 0.8) 0%,
    rgba(0, 40, 80, 0.6) 50%,
    rgba(0, 60, 120, 0.4) 100%
  );
  backdrop-filter: blur(1px);
}

.login-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  padding: 20px;
}

.login-card {
  background: rgba(0, 20, 40, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px 35px;
  border: 1px solid rgba(0, 150, 255, 0.3);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(0, 150, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.5), transparent);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  text-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
  background: linear-gradient(135deg, #ffffff, #00aaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 300;
}

.login-form {
  margin-bottom: 25px;
}

.input-group {
  margin-bottom: 20px;
}

.input-wrapper {
  position: relative;
}

.login-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  min-height: 52px;
}

.login-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.login-input:focus {
  border-color: #00aaff;
  box-shadow: 
    0 0 0 2px rgba(0, 150, 255, 0.2),
    0 0 20px rgba(0, 150, 255, 0.1);
  background: rgba(0, 40, 80, 0.9);
}

.input-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, transparent, rgba(0, 150, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.login-input:focus + .input-glow {
  opacity: 1;
}

/* 密码框特殊样式 */
.password-wrapper {
  position: relative;
}

.password-input {
  padding-right: 50px; /* 为眼睛图标留出空间 */
}

.password-toggle-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.password-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 150, 255, 0.1);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.eye-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  transition: all 0.3s ease;
}

.password-toggle-btn:hover .eye-icon {
  stroke: #00aaff;
  filter: drop-shadow(0 0 4px rgba(0, 150, 255, 0.3));
}

.verification-section {
  margin-bottom: 25px;
  text-align: center;
}

.verification-btn {
  background: linear-gradient(135deg, #00aaff, #0088cc);
  border: none;
  border-radius: 12px;
  padding: 12px 30px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 150, 255, 0.3);
}

.verification-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 150, 255, 0.4);
}

.verification-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.verification-btn.verifying {
  background: linear-gradient(135deg, #666, #888);
}

.verification-btn.verified {
  background: linear-gradient(135deg, #00cc00, #00aa00);
  box-shadow: 0 4px 15px rgba(0, 200, 0, 0.3);
}

.verification-btn.verified:hover {
  box-shadow: 0 6px 20px rgba(0, 200, 0, 0.4);
}

.verification-btn .success-icon {
  margin-right: 8px;
  font-size: 16px;
  font-weight: bold;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #00aaff, #0088cc);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 150, 255, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 150, 255, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-btn:disabled:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(0, 150, 255, 0.3);
}

/* 错误信息样式 */
.error-message {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #ff6b6b;
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(10px);
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.divider span {
  background: rgba(0, 20, 40, 0.9);
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.third-party-login {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.third-party-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.third-party-btn:hover {
  background: rgba(0, 50, 100, 0.9);
  border-color: #00aaff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 150, 255, 0.2);
}

.third-party-btn.wechat:hover {
  background: rgba(0, 200, 0, 0.1);
  border-color: #00cc00;
}

.third-party-btn.qq:hover {
  background: rgba(0, 150, 255, 0.1);
  border-color: #0099ff;
}

.third-party-btn .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-password,
.register-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.forgot-password:hover,
.register-link:hover {
  color: #00aaff;
  text-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 480px) {
  .login-content {
    padding: 15px;
    max-width: 100%;
  }
  
  .login-card {
    padding: 30px 25px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-input {
    padding: 14px 18px;
    font-size: 15px;
  }
  
  .password-input {
    padding-right: 45px; /* 移动端调整眼睛图标位置 */
  }
  
  .password-toggle-btn {
    right: 12px;
    padding: 6px;
  }
  
  .eye-icon {
    width: 18px;
    height: 18px;
  }
  
  .third-party-login {
    flex-direction: column;
  }
  
  .login-footer {
    flex-direction: column;
    gap: 10px;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeInUp 0.6s ease-out;
}

/* 发光效果 */
.login-card::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(0, 150, 255, 0.1), transparent);
  border-radius: 22px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-card:hover::after {
  opacity: 1;
}
